/*
 *接口编写处...
*如果接口需要做Action的权限验证，请在Action上使用属性
*如: [ApiActionPermission("operatelog",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Entity.DomainModels;
using Vol.Sys.IServices;
using Orther.BLL.Miyao;
using Orther.Model.param;
using Project.Utils;
using VOL.Core.Filters;
using Orther.BLL.Sys;

namespace Vol.Sys.Controllers
{
    public partial class operatelogController
    {
        private readonly IoperatelogService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;
        private OperateLogBLL operateLogBLL = new OperateLogBLL();

        [ActivatorUtilitiesConstructor]
        public operatelogController(
            IoperatelogService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }


        [ApiActionPermission(VOL.Core.Enums.ActionPermissionOptions.Search)]
        [HttpGet, Route("GetPageDataZjc")]
        public ActionResult GetPageDataZjc(OperatelogParam param, Pagination pagination)
        {
            TData<List<operatelog>> obj = operateLogBLL.GetPageList(param, pagination);
            return JsonNormal(obj);
        }


        [ApiActionPermission(VOL.Core.Enums.ActionPermissionOptions.Search)]
        [HttpGet, Route("GetListJson")]
        public async Task<ActionResult> GetListJson(OperatelogParam param, int? topNum)
        {
            TData<List<operatelog>> obj = await operateLogBLL.GetList(param, topNum);
            return JsonNormal(obj);
        }

    }
}
